-
Notifications
You must be signed in to change notification settings - Fork 1.2k
stdoutmetric exporter observability #7492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
stdoutmetric exporter observability #7492
Conversation
…GO_X_SELF_OBSERVABILITY
…etrics 1. otel.sdk.exporter.metric_data_point.inflight 2. otel.sdk.exporter.metric_data_point.exported 3. otel.sdk.exporter.operation.duration
- use pool to amortize slice allocation - pass actual context - use t.Cleanup instead of defer in tests - improve readability by returning without using err var
- use metricdatatest for comparision in testcase
|
Updated Benchmarks exporter_1.txt (commit=c106988)exporter_3.txt (commit=545ab7e) |
exporters/stdout/stdoutmetric/internal/observ/instrumentation.go
Outdated
Show resolved
Hide resolved
exporters/stdout/stdoutmetric/internal/observ/instrumentation.go
Outdated
Show resolved
Hide resolved
exporters/stdout/stdoutmetric/internal/observ/instrumentation.go
Outdated
Show resolved
Hide resolved
exporters/stdout/stdoutmetric/internal/observ/instrumentation.go
Outdated
Show resolved
Hide resolved
exporters/stdout/stdoutmetric/internal/observ/instrumentation_test.go
Outdated
Show resolved
Hide resolved
exporters/stdout/stdoutmetric/internal/observ/instrumentation_test.go
Outdated
Show resolved
Hide resolved
exporters/stdout/stdoutmetric/internal/observ/instrumentation_test.go
Outdated
Show resolved
Hide resolved
exporters/stdout/stdoutmetric/internal/observ/instrumentation_test.go
Outdated
Show resolved
Hide resolved
exporters/stdout/stdoutmetric/internal/observ/instrumentation_test.go
Outdated
Show resolved
Hide resolved
|
Updated Benchmarks exporter_1.txt (commit=c106988)exporter_4.txt (commit=39c5f62)Benchmark vs exporter_3.txt (Before review from @MrAlias) |
flc1125
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition, we are missing a benchmark test case and its results based on the exporter.
exporters/stdout/stdoutmetric/internal/observ/instrumentation_test.go
Outdated
Show resolved
Hide resolved
exporters/stdout/stdoutmetric/internal/observ/instrumentation_test.go
Outdated
Show resolved
Hide resolved
I didn't get this point. This module has benchmark tests similar to others. Could you please help me in understanding exactly what's missing? |
|
Fixes #7014
This PR adds support for below self observability metrics for stdoutmetric exporter
These metrics are experimental and hence behind a feature flag OTEL_GO_X_OBSERVABILITY.
Definition of above metrics is available at https://github.com/open-telemetry/semantic-conventions/blob/v1.36.0/docs/otel/sdk-metrics.md
Observability Implementation Checklist
Observability Implementation Checklist
Based on the project Observability guidelines, ensure the following are completed:
Environment Variable Activation
OTEL_GO_X_OBSERVABILITYenvironment variablex.Observability.Enabled()check 1Encapsulation
struct(e.g.,Instrumentation)Initialization
otel.GetMeterProvider())Version)SchemaURL)Performance
Attribute and Option Allocation Management
sync.Poolfor attribute slices and options with dynamic attributesCaching
Benchmarking
b.ReportAllocs()in benchmarks)Error Handling and Robustness
otel.Handle()otel.Handle()only when component cannot report error to userContext Propagation
context.Background())Semantic Conventions Compliance
otelconvconvenience package for metric semantic conventionsTesting
t.Cleanup())t.Setenv()for environment variable testingFootnotes
https://github.com/open-telemetry/opentelemetry-go/blob/e4ab3141123d0811125a69823dbbe4d9ec5a9b8f/exporters/stdout/stdouttrace/internal/observ/instrumentation.go#L101-L103 ↩
https://github.com/open-telemetry/opentelemetry-go/blob/e4ab3141123d0811125a69823dbbe4d9ec5a9b8f/exporters/stdout/stdouttrace/internal/x/x.go ↩
https://github.com/open-telemetry/opentelemetry-go/blob/e4ab3141123d0811125a69823dbbe4d9ec5a9b8f/sdk/internal/x/x.go ↩